package cn.yunhe.beans;

import java.util.Date;
import java.util.List;

public class Order {

    /**
     * 订单id
     */
    private String orderId;

    /**
     * 订单创建时间
     */
    private Date orderCreateDate;

    /**
     * 订单结束时间
     */
    private Date orderEndDate;

    /**
     * 订单总价格
     */
    private double orderPrice;

    /**
     * 订单完成状态
     */
    private int orderStatus;

    private User user;

    private List<OrderDetail> detailList;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Date getOrderCreateDate() {
        return orderCreateDate;
    }

    public void setOrderCreateDate(Date orderCreateDate) {
        this.orderCreateDate = orderCreateDate;
    }

    public Date getOrderEndDate() {
        return orderEndDate;
    }

    public void setOrderEndDate(Date orderEndDate) {
        this.orderEndDate = orderEndDate;
    }

    public double getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(double orderPrice) {
        this.orderPrice = orderPrice;
    }

    public int getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(int orderStatus) {
        this.orderStatus = orderStatus;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderDetail> getDetailList() {
        return detailList;
    }

    public void setDetailList(List<OrderDetail> detailList) {
        this.detailList = detailList;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"orderId\":\"")
                .append(orderId).append('\"');
        sb.append(",\"orderCreateDate\":\"")
                .append(orderCreateDate).append('\"');
        sb.append(",\"orderEndDate\":\"")
                .append(orderEndDate).append('\"');
        sb.append(",\"orderPrice\":")
                .append(orderPrice);
        sb.append(",\"orderStatus\":")
                .append(orderStatus);
        sb.append(",\"user\":")
                .append(user);
        sb.append(",\"detailList\":")
                .append(detailList);
        sb.append('}');
        return sb.toString();
    }
}
